package cbc.dao.pojo;

/**
 * TCompanyUserId entity. @author MyEclipse Persistence Tools
 */

public class TCompanyUserId implements java.io.Serializable {

	// Fields

	private TCompany company;
	private TCertificate certificate;

	// Constructors

	/** default constructor */
	public TCompanyUserId() {
	}

	/** full constructor */
	public TCompanyUserId(TCompany company, TCertificate certificate) {
		this.company = company;
		this.certificate = certificate;
	}

	// Property accessors

	public TCompany getCompany() {
		return company;
	}

	public void setCompany(TCompany company) {
		this.company = company;
	}

	public TCertificate getCertificate() {
		return certificate;
	}

	public void setCertificate(TCertificate certificate) {
		this.certificate = certificate;
	}
	
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TCompanyUserId))
			return false;
		TCompanyUserId castOther = (TCompanyUserId) other;

		return ((this.getCompany() == castOther.getCompany()) || (this
				.getCompany() != null && castOther.getCompany() != null && this
				.getCompany().equals(castOther.getCompany())))
				&& ((this.getCertificate() == castOther.getCertificate()) || (this
						.getCertificate() != null
						&& castOther.getCertificate() != null && this
						.getCertificate().equals(castOther.getCertificate())));
	}

	

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCompany() == null ? 0 : this.getCompany().hashCode());
		result = 37
				* result
				+ (getCertificate() == null ? 0 : this.getCertificate()
						.hashCode());
		return result;
	}

}